﻿using eslib.FileManageLib;

namespace demo
{
    internal class Program
    {
        static void Main(string[] args)
        {
            new Program().run();
        }

        private void run()
        {
            FilePool pool = new FilePool();
            pool.Init();

            //YSJson json = new YSJson(ObjType.斗数, new ObjJson() { t = DateTime.Now });
            //pool.SaveObject("file1.json", json);
            FileItem c = (FileItem)pool.Dirs[0].Children[0];
            FileInfo fi = c.GetFileInfo();


            var j = pool.LoadObject<YSJson>("file1.json");
        }
    }


    public class YSJson
    {
        public YSJson()
        {
        }

        public YSJson(ObjType fileType, ObjJson json)
        {
            FileType = fileType;
            Json = json;
        }

        public ObjType FileType { get; set; }

        public ObjJson Json { get; set; }
    }


    public enum ObjType
    {
        奇门, 梅花, 斗数
    }

    public class ObjJson
    {
        public DateTime t { get; set; }
    }
}